//
//  FreeManagerSelfViewController.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/8.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "FreeManagerSelfViewController.h"
#import "FreeManagerSelfViewModel.h"
#import "StoreInformationViewController.h"
#import "WithDrawalViewController.h"

@interface FreeManagerSelfViewController ()
@property (nonatomic, strong) FreeManagerSelfViewModel *viewModel;

@end

@implementation FreeManagerSelfViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.viewModel = [[FreeManagerSelfViewModel alloc] initWithViewToViewModel:self.groupedTableView theSuperView:self.view];
    kWeakSelf(self);
    self.viewModel.BlockInto = ^(GLGWButton *btn) {
        [weakself rightAction:btn];
    };
    self.viewModel.BlockLeft = ^(GLGWButton *btn) {
        [weakself leftAction:btn];
    };
}

- (void)rightAction:(GLGWButton *)sender
{
    StoreInformationViewController * storeVC = [StoreInformationViewController new];
    [self.navigationController pushViewController:storeVC animated:YES];
}

- (void)leftAction:(GLGWButton *)sender
{
    WithDrawalViewController *vc = [[WithDrawalViewController alloc] init];
    vc.withDrawType = WithDrawType_Balance;
    [self.navigationController pushViewController:vc animated:YES];
}

@end
